<?php $this->load->view('scenic/layout/header') ?>
<header class="list-head">
    <form method="get" action="<?php echo site_url('scenic/search/index'); ?>">
        <a href="javascript:goHistoryBack('<?php echo site_url('scenic/home/index');?>');" class="list-return">
            <i class="iconfont">&#xe606;</i>
        </a>
        <div class="list-input">
            <input type="text" name="keyword" value="<?php echo $this->input->get('keyword');?>" placeholder="城市/景点" autocomplete="off">
            <i class="iconfont">&#xe635;</i>
        </div>
        <button class="list-submit" type="submit">搜索</button>
    </form>
</header>
<?php if ($result->num_rows() >0): ?>
    <section class="widthMax list-li">
        <div>
            <?php $this->load->view('scenic/search/ajaxlist') ?>
        </div>
        <div class="sec-load" id="my-scrollspy">
            <i class="iconfont am-animation-spin">&#xe60c;</i>
        </div>
    </section>
    <footer id="foot" class="list-foot animated am-panel am-panel-primary" data-keyword="<?php echo $this->input->get('keyword'); ?>" data-provinceid="<?php echo $this->input->get('provinceid'); ?>" data-cityid="<?php echo $this->input->get('cityid'); ?>">
        <ul class="flex list-target">
            <li data-foot='{"target":".foot-one"}'>
                <i class="iconfont">&#xe631;</i>
                <p class="rank-one">综合排序</p>
            </li>
            <li data-foot='{"target":".foot-two"}'>
                <i class="iconfont">&#xe633;</i>
                <p class="theme-two">主题</p>
            </li>
            <li data-foot='{"target":".foot-three"}'>
                <i class="iconfont" >&#xe621;</i>
                <p class="recom-three">推荐</p>
            </li>
        </ul>
    </footer>
    <div class="foot-one foot-alert">
        <ul class="alert-list">
            <li data-id="1" data-elect='{"class":".rank-one","text":"综合排序"}' <?php if($this->input->get('sort')==1){echo 'class="active"';} ?> >综合排序<i class="iconfont">&#xe632;</i></li>
            <li data-id="2" data-elect='{"class":".rank-one","text":"销量最高"}' <?php if($this->input->get('sort')==2){echo 'class="active"';} ?> >销量最高<i class="iconfont">&#xe632;</i></li>
            <li data-id="3" data-elect='{"class":".rank-one","text":"价格从高到低"}' <?php if($this->input->get('sort')==3){echo 'class="active"';} ?> >价格从高到低<i class="iconfont">&#xe632;</i></li>
            <li data-id="4" data-elect='{"class":".rank-one","text":"价格从低到高"}' <?php if($this->input->get('sort')==4){echo 'class="active"';} ?> >价格从低到高<i class="iconfont">&#xe632;</i></li>
        </ul>
    </div>
    <div class="foot-two foot-alert">
        <ul class="am-cf theme-list">
            <?php foreach ($scenicCategory as $value): ?>
            <li data-id="<?php echo $value->category_id; ?>" data-elect="{'class':'.theme-two','text':'<?php echo $value->category_name;?>'}" <?php if ($this->input->get('theme')==$value->category_id):?>class="active"<?php endif;?>>
                <?php echo $value->category_name; ?>
            </li>
            <?php endforeach; ?>
        </ul>
    </div>
    <div class="foot-three foot-alert">
        <div class="foot-ative am-cf">
            <button class="cancel">取消</button>
            <button class="three-active">确定</button>
        </div>
        <ul class="three-list">
            <li data-id="today" <?php if ($this->input->get('today') ==1) :?>class="active"<?php endif ?>>
                <span>今日可订</span>
                <div class="three-case">
                    <i class="iconfont">&#xe632;</i>
                </div>
            </li>
            <li data-id="special" <?php if ($this->input->get('special') ==1) :?>class="active"<?php endif ?>>
                <span>特价活动</span>
                <div class="three-case">
                    <i class="iconfont">&#xe632;</i>
                </div>
            </li>
            <li data-id="bonus" <?php if ($this->input->get('bonus') ==1) :?>class="active"<?php endif ?>>
                <span>积分可用</span>
                <div class="three-case">
                    <i class="iconfont">&#xe632;</i>
                </div>
            </li>
        </ul>
    </div>
    <div class="am-dimmer list-shade"></div>
<?php else: ?>
    <section class="no-result widthMax flex flex-align-center">
        <div class="no-center">
            <i class="iconfont">&#xe60d;</i>
            <p>木有结果，再找找看！</p>
        </div>
    </section>
<?php endif; ?>
<?php $this->load->view('scenic/layout/footer') ?>